package org.s2015.testgdq.servlet;

import java.io.IOException;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

//import com.talkweb.Qmessage.service.QmessageManager;

//servlet  使用 spring bean
public class QmessageServlet extends HttpServlet{

	public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 
		String message = new String(request.getParameter("content").getBytes("ISO8859-1"));
		//System.out.println(message);
		ServletContext application;   
        WebApplicationContext wac;   
        application = getServletContext();   
        wac = WebApplicationContextUtils.getWebApplicationContext(application);//获取spring的context   
//        QmessageManager qmessageManager = (QmessageManager) wac.getBean("QmessageManager");   

//        qmessageManager.getGifURL(message);
	}
 
}